//
// Created by lingzhitech on 25-9-22.
//

#include "BulkQuote.h"
// if the specified number of items are purchased, use the discounted price
double BulkQuote::netPrice(size_t cnt) const
{
    if (cnt >= minimumQuantity_)
        return cnt * (1 - discount_) * price_;
    else
        return cnt * price_;
}

void BulkQuote::debug() const {
    Quote::debug();
    std::cout << "Minimum Quantity: " << minimumQuantity_ << std::endl;
    std::cout << "Discount: " << discount_ << std::endl;
}
